﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@{
    ViewBag.title = "Index";
}

<div class="container">

    <div class="blog-header">
        <h1 class="blog-title">Aveiro Airlines Managment System</h1>
        <p class="lead blog-description">Welcome to the API documentation of AAMS</p>
    </div>

    <div class="row">

        <div class="col-sm-8 blog-main">

            <div class="blog-post">
                <h2 class="blog-post-title">About this documentation</h2>
                <p>In this documentation you can find all the necessary information about the AAMS API and how you can use it to integrate AMMS with your application</p>
                <hr>
                <p>AAMS API can be divided into 5 main areas related to:</p>
                <ul>
                    <li> @Html.ActionLink("Airports information", "", "Airports")  </li>
                    <li> @Html.ActionLink("Flights Search", "", "FlightSearch") </li>
                    <li> @Html.ActionLink("Flights Reservations", "", "FlightReservation") </li>
                    <li> @Html.ActionLink("Reservations Search", "", "SearchReservation") </li>
                </ul>

                <h3>Initial Requirments</h3>
                <p>
                    This API can only be used with an appropriated key token.
                    In order to obtain an API token one must a registered user of AAMS and place a request for a key token on the personal account settings.
                    One temporary key token will be generated imidiatly (allowing for a total of 200 API calls).
                    This token will only be marked as an unrestricted key token if a user pay the respective anual fee that allow the use of a token for professional purposes.
                </p>
                <h3>What kind of API does AAMS privide?</h3>
                <p>
                    The AAMS API is a REST API, implemented as plain XML or JSON, that can be accessed over HTTP requests using commands as – GET, POST and PUT.
                    This API was implemented with the REST principles in mind and was developed with the intention of being a easy to use REST API.
                </p>
                <h3>What is a key token in AAMS?</h3>
                <p>
                    A key token is a set of characters that must be passed in each http request to the api and that identifies, unequivocally, a AMMS client.
                    The following code is an example of a key token that can be provided by AAMS.
                </p>
                <pre><code>449D3FD6-1B70-4440-9E90-594E44C5EDDC</code></pre>
                <p>As mentioned before this token must allways be supplied in each http request as an Header element</p>
                <h3>The <em>"token"</em> header identifier</h3>
                <p>
                    In every request to the API a key token must be provided as an Header element.
                    This header element must be identified with the name "token".
                    A request to the API will only be accepted with a valid key token.
                </p>
                <h3>How to test the API</h3>
                <p>
                    A good way to test this API is by installing some kind of application extention to your web browser that allows the direct call of REST APIs.<br />
                    In this documentation we are going to use <a href="https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm">POSTMAN</a>.
                    POSTMAN is an Chrome extention client REST API that can be used send request (GET, POST, PUT, DELETE) to a remote API.
                </p>
                <h3>Rent-a-car key token</h3>
                <p>
                    We already provided a key token for the Rent-A-Car team.<br />
                    This is and key that identifies them unequivocally and allows the use of this API without any kind of restriction.
                </p>
                <pre><code>28DFC909-1B15-4BC9-985E-BE4E58E46370</code></pre>
                <h3>Hotel token</h3>
                <p>
                    We already provided a key token for the Hotel team.<br />
                    This is and key that identifies them unequivocally and allows the use of this API without any kind of restriction.
                </p>
                <pre><code>BCBF9438-68E1-4F79-BACE-11CB2BB3D4A1</code></pre>
                <h3>What's next?</h3>
                <p>
                    You can use the top menu to navigate freely between the different parts of this documentation or you can follow the buttons on the bottom of each page.
                    Following the next/back buttons have the advantage of presenting the API as a sequence of learning classes that are easier to memorise.
                </p>
            </div><!-- /.blog-post -->

            <ul class="pager">
                <li>@Html.ActionLink("Next - Get Airports", "", "Airports")</li>
            </ul>

        </div><!-- /.blog-main -->

        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
            <div class="sidebar-module sidebar-module-inset">
                <h4>About the authors</h4>
                <p>This page and all its content were developed by <em>José Brazeta</em>, <em>Luis Carta</em> and <em>João Martins</em> as an assignment for Advanced Web Programing (AEP), a course of the master degree in Information Systems at Aveiro University
            </div>
            <div class="sidebar-module">
                <h4>Other information:</h4>
                <ol class="list-unstyled">
                    <li><a href="#">AAMS Main Page</a></li>
                    <li><a href="#">Capsule CRM API</a></li>
                    <li><a href="#">Kashflow Main Page</a></li>
                </ol>
            </div>
            <div class="sidebar-module">
                <h4>Codeplex Repository</h4>
                <ol class="list-unstyled">
                    <li><a href="#">Get AAMS from Codeplex</a></li>
                </ol>
            </div>
        </div><!-- /.blog-sidebar -->

    </div><!-- /.row -->

</div>
